<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <script>
    const Father = function (uname, age) {
      this.uname = uname;
      this.age = age;
    };
    Father.prototype.sing = function () {
      console.log(`原型对象constructor指向创建的构造函数`);
    };
    // 给prototype添加更多的方法
    Father.prototype = {
      constructor: Father, //手动指向构造函数
      say: function () {
        console.log(`添加多个方法使用的`);
      },
      money: function () {
        console.log(`看到哪个更加的厉害了`);
      }
    };
    let ldh = new Father("陈臻", 23);
    console.log(Father.prototype.constructor);
    console.log(ldh.__proto__.constructor);
  </script>
</body>

</html>